<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        .container {
            width: 600px;
            height: 600px;
            margin: 0 auto;
            background-color: pink;
            position: relative;
        }
        .box {
            width: 100px;
            height: 100px;
        }
        .box1 {
            background-color: red;
        }
        .box2 {
            /* 浮动遮盖 */
            background-color:orange;
            margin-top: -50px;
            float: left;
        }
        .box3 {
            background-color: yellow;
            display: inline-block;
            position: relative;
            left: -100px;
        }
        .box4 {
            background-color: green;
            position:absolute;
            /* left: -50px; */
            top: 150px;
        }
        .box5 {
            background-color: blue;
            position:fixed;
            left: 50%;
            margin-left: -300px;
            top: 208px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box box1">正常盒子</div>
        <div class="box box2">浮动盒子</div>
        <div class="box box3">相对定位盒子</div>
        <div class="box box4">绝对定位盒子</div>
        <div class="box box5">固定定位盒子</div>
    </div>
</body>
</html>